home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d22 / wssi338b.arc / WSSIFRM.DOC < prev    next >
Text File  |  1988-09-16  |  4KB  |  133 lines

  1.  
  2.  
  3.  
  4.          Copyright (C) 1988 by Robert W. Babcock and WSS Division of DDC
  5.                                All Rights Reserved
  6.  
  7.  
  8.                             WSSINDEX Database Format
  9.  
  10.         This  is a description of the format of a WSSINDEX database.   This 
  11.         information is not needed for normal program operation,  but may be 
  12.         useful  if  you  want to write a program  to  convert  an  existing 
  13.         database  into a WSSINDEX database,  read the database with another 
  14.         program to produce a customized listing,  or recover a damaged disk 
  15.         file.   This description may be easier to follow if you use it as a 
  16.         guide  while  examining a small database with DEBUG or  some  other 
  17.         utility.
  18.  
  19.         Dates  and times are stored in the same format as used in  an  FCB.  
  20.         Date has 7 bits for years since 1980,  4 bits for month, 5 bits for 
  21.         day.   Time  has  5 bits for hour,  6 bits for minute,  5 bits  for 
  22.         second.
  23.  
  24.         The  database is stored unsorted.   This is done because  the  time 
  25.         required  by the Quicksort algorithm used by WSSINDEX is O(n*log n) 
  26.         for  a randomly ordered source,  but O(n*n) for an already  ordered 
  27.         input.   In  more concrete terms,  storing the database  in  sorted 
  28.         order  would  turn  a 30 second sort into a longer than  10  minute 
  29.         sort.
  30.  
  31.         Notation:   \n   - a newline, that is an ASCII linefeed, hex 0A
  32.                     \EOS - end of string marker, hex 0
  33.                     *    - a field dependent on the WSSINDEX version
  34.  
  35.            length     contents
  36.            (bytes)
  37.  
  38.         Header:
  39.  
  40.            9          "WSSINDEX\n"
  41.            4-6*       version number\n
  42.            2          number of disks in database
  43.            2          number of subdirectories (including root)
  44.            2          number of files
  45.  
  46.         Disk record, repeated for each disk:
  47.  
  48.            11         volume name, blank padded to 11 chars (no \n or EOS)
  49.            4          bytes on disk
  50.            4          free bytes on disk
  51.            2          number of files on disk
  52.            2          number of subdirectories on disk (not counting root)
  53.            2          date indexed
  54.            1          "Y" or "N" for bootable or not
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.         Subdirectory record, repeated for each subdirectory:
  71.  
  72.            2          disk number, count starts at zero
  73.            variable   subdirectory name\n
  74.  
  75.         File record, repeated for each file:
  76.  
  77.            9          file name\EOS   there may be garbage after the \EOS
  78.            4          extension\EOS   there may be garbage after the \EOS
  79.            2          date
  80.            2          time
  81.            4          size
  82.            2          disk number,  high bit set if file is a member of  an 
  83.                       ARC file
  84.            2          subdirectory  number (root is 0) for  ordinary  file, 
  85.                       file number of containing .ARC file for .ARC member
  86.            1          "C" (if commented), else blank
  87.            variable   comment\n   if comments flag is "C"
  88.            1*         "C" (if categorized),  else blank; field only present 
  89.                       if written by version 2.00 or later
  90.            variable*  category\n  if category flag is "C"
  91.  
  92.         Note  that  there is not a control-Z to mark the end of  file,  and 
  93.         there may be embedded control-Z's in the binary fields (date, time, 
  94.         size, etc.).
  95.  
  96.         This information is subject to change in future releases.  However, 
  97.         I  do guarantee that WSSINDEX will alway be able to read  databases 
  98.         written by older versions of the program.  Note that this guarantee 
  99.         does not apply to configuration files.
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.